import 'dart:core';

import 'package:hive_ce/hive.dart';

part 'book.g.dart';

@HiveType(typeId: 0)
class Book extends HiveObject{
  @HiveField(0)
  final int id;

  @HiveField(1)
  final String title;

  @HiveField(2)
  final String author;

  @HiveField(3)
  int lastRead;

  @HiveField(4)
  final List<int> chapterIds; // 存储章节ID列表

  Book({
    required this.id,
    required this.title,
    required this.author,
    required this.chapterIds,
    required this.lastRead,
  });
}